package com.management.service.Impl;

import com.management.dao.PersonnelFormDao;
import com.management.po.PersonnelForm;
import com.management.service.PersonnelFormService;
import com.management.vo.PersonnelFormVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @category: 人事调动申请表业务逻辑接口实现类
 * @author: cwsheng
 * @version: 1.0
 * @date: 2021/10/30 18:48
 */
@Service
public class PersonnelFormServiceImpl implements PersonnelFormService {
    @Autowired
    PersonnelFormDao personnelFormDao;
    @Override
    public List<PersonnelFormVO> findAll() {
        return personnelFormDao.findAll();
    }

    @Override
    public List<PersonnelFormVO> findByCompanyId(int companyId) {
        return personnelFormDao.findByCompanyId(companyId);
    }

    @Override
    public PersonnelFormVO findByPersonnelFormId(int personnelFormId) {
        return personnelFormDao.findByPersonnelFormId(personnelFormId);
    }

    @Override
    public boolean add(PersonnelForm personnelForm) {
        return personnelFormDao.add(personnelForm)>0?true:false;
    }

    @Override
    public boolean update(PersonnelForm personnelForm) {
        return personnelFormDao.update(personnelForm)>0?true:false;
    }
}
